<template>
  <div id="app">
  <router-view/>
    <FooterGuide v-show="$route.meta.showFooter"/>
  </div>
</template>

<script>
  import {mapActions} from 'vuex'
import FooterGuide from './components/footerGuide/footerGuide'

export default{
  name: 'App',
  mounted(){
    this.$store.dispatch('getAddress'),// this.$store.dispatch是一种方式
      //this.$store.dispatch('getFoodCategorys')
      this.getAddress()
      this.getUserInfo()
  },
  components:{
    FooterGuide
  },
  methods:{
    ...mapActions(['getAddress','getUserInfo'])
  }
}
</script>

<style scoped lang="stylus" rel="stylesheet/stylus">
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
 padding :0;margin :0;
  background-color #f5f5f5;
  width 100%
  height 100vh
  position relative
}

</style>
